package com.flyco.modules.pms.service;

import com.flyco.modules.oms.entity.OmsOrderItem;
import com.flyco.modules.pms.entity.PmsSkuStock;
import com.baomidou.mybatisplus.extension.service.IService;
import com.flyco.modules.stm.entity.StmStock;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @Description: SKU
 * @Author: flyco
 * @Date:   2019-11-22
 * @Version: V1.0
 */
public interface IPmsSkuStockService extends IService<PmsSkuStock> {

	public List<PmsSkuStock> selectByMainId(Long mainId);

	public int releaseSkuStockLock(List<OmsOrderItem> orderItemList);

	Integer getStockByProductId(Long productId);

	public int releaseLockStock(Long stockId,Integer quantity, Long version);

	public int releaseSkuStockLockByList(List<OmsOrderItem> orderItemList);

	boolean addByProductSnAndStoreId(String productSn, Long storeId, Integer channelId);

	/**
	 * 把渠道下的某个商品标记删除
	 */
	boolean updateCancelFlag(String productSn, Integer channelId, Integer status);
}
